home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
090
/
byt86feb.arc
/
ANALYZER.ONE
next >
Wrap
Text File
|
1985-10-02
|
1KB
|
44 lines
10 REM FREQUENCY ANALYZER 1
20 REM
30 REM BY JIM TANKARD
40 REM 3003 CHERRY LANE
50 REM AUSTIN, TEXAS 78703
60 REM
70 DIM A%(26),B%(26): REM THESE ARRAYS HOLD THE TWO FREQUENCY COUNTS TO BE COMPARED
80 LET SI% = 0
90 D$ = CHR$ (4)
100 REM GETS NAMES OF FILES
110 INPUT "WHAT FILE CONTAINS THE FIRST FREQUENCY COUNT?";N$
120 INPUT "WHAT FILE CONTAINS THE SECOND FREQUENCY COUNT?";M$
130 REM OPENS FIRST FILE AND READS ITS FREQUENCIES INTO A%(I)
140 PRINT D$;"OPEN ";N$
150 PRINT D$;"READ ";N$
160 FOR I = 1 TO 26
170 INPUT C$: LET C% = VAL (C$)
180 LET A%(I) = C%
190 NEXT I
200 PRINT D$;"CLOSE ";N$
210 HOME
220 REM OPENS SECOND FILE AND READS ITS FREQUENCIES INTO B%(I)
230 PRINT D$;"OPEN ";M$
240 PRINT D$;"READ ";M$
250 FOR I = 1 TO 26
260 INPUT C$: LET C% = VAL (C$)
270 LET B%(I) = C%
280 NEXT I
290 PRINT D$;"CLOSE ";M$
300 REM COMPUTES DIFFERENCE INDEX
310 FOR I = 1 TO 26
320 LET SI% = SI% + ABS (A%(I) - B%(I))
330 NEXT I
340 REM PRINTS RESULTS
350 HOME
360 PRINT "FIRST SAMPLE: ";N$
370 PRINT
380 PRINT "SECOND SAMPLE: ";M$
390 PRINT
400 PRINT "DIFFERENCE INDEX: ";SI%
410 END